package com.example.basic.web.model.pharmStock;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.basic.base.IdEntity;
import com.example.basic.base.event.PreCreateEventEntity;
import com.example.basic.base.event.PreUpdateEventEntity;
import com.example.basic.utils.CommonConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * <p>
 * 库存记录
 * </p>
 *
 * @roleor zzl
 * @since 2024-3-14
 */
@Data
@TableName("sys_pharm_stock")
@ApiModel(value="PharmStock对象", description="库存记录")
public class PharmStock extends IdEntity implements PreCreateEventEntity, PreUpdateEventEntity {


    @TableField(exist = false)
    public static final String ID = "id";

    @TableField(exist = false)
    public static final String out_datetime = "out_datetime";

    @TableField(exist = false)
    public static final String out_oper_person = "out_oper_person";

    @ApiModelProperty(value = "数据id")
    @TableId(value = "id")
    private String id;

    @ApiModelProperty(value = "数据创建时间")
    @TableField(value = "create_at", fill = FieldFill.INSERT)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date createAt;

    @ApiModelProperty(value = "数据创建人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "数据修改时间")
    @TableField(value = "update_at", fill = FieldFill.UPDATE)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date updateAt;

    @ApiModelProperty(value = "数据修改人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty(value = "遗体编码")
    @TableField("remains_code")
    private String remainsCode;

    @ApiModelProperty(value = "仓库编码")
    @TableField("pharm_code")
    private String pharmCode;

    @ApiModelProperty(value = "分区编码")
    @TableField("zone_code")
    private String zoneCode;

    @ApiModelProperty(value = "库位编码")
    @TableField("depot_code")
    private String depotCode;

    @ApiModelProperty(value = "入库单据编码")
    @TableField("in_pharm_code")
    private String inPharmCode;

    @ApiModelProperty(value = "入库时间")
    @TableField("in_datetime")
    @JsonFormat(pattern = CommonConstant.TIME_FORMAT_TEN)
    private Date inDatetime;

    @ApiModelProperty(value = "入库员")
    @TableField("in_oper_person")
    private String inOperPerson;

    @ApiModelProperty(value = "出库时间")
    @TableField("out_datetime")
    private Date outDatetime;

    @ApiModelProperty(value = "出库员")
    @TableField("out_oper_person")
    private String outOperPerson;

}